package com.heima.controller;

import com.heima.common.PageResult;
import com.heima.pojo.dto.RegionDTO;
import com.heima.pojo.vo.RegionVO;
import com.heima.service.RegionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/vm-service/region")
@Slf4j
public class RegionController {
    @Autowired
    RegionService regionService;

    @GetMapping( "/search")
    public PageResult<RegionVO> page(RegionDTO regionDTO){
        log.info("分页查询区域: {}", regionDTO);
        return regionService.page(regionDTO);
    }


}
